package com.zhangfb95.crosschain.server.infra.data.api.exc;

import com.zhangfb95.crosschain.infra.model.Result;
import com.zhangfb95.crosschain.protocol.exc.ExcAccountService;
import com.zhangfb95.crosschain.protocol.exc.request.GetAccountExcReq;
import com.zhangfb95.crosschain.protocol.exc.request.SignExcReq;
import com.zhangfb95.crosschain.protocol.exc.response.GetAccountExcRes;
import com.zhangfb95.crosschain.protocol.exc.response.SignExcRes;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.service.annotation.HttpExchange;
import org.springframework.web.service.annotation.PostExchange;

/**
 * @author zhangfubing
 * @since 2023/10/19
 */
@HttpExchange("/exc/account")
public interface ExcAccountApi extends ExcAccountService {

    @PostExchange("/getAccount")
    @Override
    Result<GetAccountExcRes> getAccount(@RequestBody @Validated GetAccountExcReq req);

    @PostExchange("/sign")
    @Override
    Result<SignExcRes> sign(@RequestBody @Validated SignExcReq req);
}
